'use strict'
import MMALL_COMM from 'util/comm.jsx';
const _comm = new MMALL_COMM();
class Order {
    // 获取订单列表
    getOrderList(listParam){
        if(listParam.listType == 'list'){
            return _comm.request({
                url     : _comm.getServerHost('/manage/order/list.do'),
                data    : {
                    pageNum : listParam.pageNum  || 1 ,
                    pageSize: listParam.pageSize || 10
                }
            });
        }
        else if(listParam.listType == 'search'){
            return _comm.request({
                url     : _comm.getServerHost('/manage/order/search.do'),
                data    : {
                            orderNo : listParam.orderNo
                        }
            });
        } 
    }
    // 获取订单详情
    getOrderDetail(orderNo){
        return _comm.request({
            url     : _comm.getServerHost('/manage/order/detail.do'),
            data    : {
                orderNo : orderNo || 0
            }
        });
    }
    // 发货
    sendGoods(orderNo){
        return _comm.request({
            url     : _comm.getServerHost('/manage/order/send_goods.do'),
            data    : {
                orderNo : orderNo || 0
            }
        });
    }

}
export default Order